I'm trying to modify an attribute of an object, which is of text type by creating a list. For all the links in the object, it will add the name of the links into the attribute as a list |
Re: Logic Question
The basic idea is to add the line break before adding a string, but first look if the target string is not empty: string s = obj."Link" if (length s > 0) s = s "\n" nameofLink else s = nameOfLink obj."Link" = s
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
|
Re: Logic Question The "length" check is good most of the time, but sometimes this is needed:
string EOL = ""
Buffer FinalResults = create()
for whatever my loop is
{ ThisResults = whatever I get from this loop
FinalResults += EOL
FinalResults += ThisResults
EOL = "\n" // get ready for next loop, if any
}
deal with FinalResults
delete(FinalResults)
|